package com.ruoyi.yipaiju.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yipaiju.mapper.ValueAddedOrderMapper;
import com.ruoyi.yipaiju.domain.ValueAddedOrder;
import com.ruoyi.yipaiju.service.IValueAddedOrderService;

/**
 * fo_value_added_orderService业务层处理
 * 
 * @author liuwp
 * @date 2023-03-01
 */
@Service
public class ValueAddedOrderServiceImpl implements IValueAddedOrderService 
{
    @Autowired
    private ValueAddedOrderMapper valueAddedOrderMapper;

    /**
     * 查询fo_value_added_order
     * 
     * @param id fo_value_added_order主键
     * @return fo_value_added_order
     */
    @Override
    public ValueAddedOrder selectValueAddedOrderById(Long id)
    {
        return valueAddedOrderMapper.selectValueAddedOrderById(id);
    }

    /**
     * 查询fo_value_added_order列表
     * 
     * @param valueAddedOrder fo_value_added_order
     * @return fo_value_added_order
     */
    @Override
    public List<ValueAddedOrder> selectValueAddedOrderList(ValueAddedOrder valueAddedOrder)
    {
        return valueAddedOrderMapper.selectValueAddedOrderList(valueAddedOrder);
    }
    @Override
    public List<ValueAddedOrder> selectValueAddedOrderList1(ValueAddedOrder valueAddedOrder)
    {
        return valueAddedOrderMapper.selectValueAddedOrderList1(valueAddedOrder);
    }

    /**
     * 根据业务主键查询一条记录：fo_value_added_order
     *
     * @param valueAddedOrder fo_value_added_order
     * @return fo_value_added_order
     */
    @Override
    public ValueAddedOrder selectOneValueAddedOrder(ValueAddedOrder valueAddedOrder)
    {
        return valueAddedOrderMapper.selectOneValueAddedOrder(valueAddedOrder);
    }

    /**
     * 新增fo_value_added_order
     * 
     * @param valueAddedOrder fo_value_added_order
     * @return 结果
     */
    @Override
    public int insertValueAddedOrder(ValueAddedOrder valueAddedOrder)
    {
        valueAddedOrder.setCreateTime(DateUtils.getNowDate());
        return valueAddedOrderMapper.insertValueAddedOrder(valueAddedOrder);
    }

    /**
     * 修改fo_value_added_order
     * 
     * @param valueAddedOrder fo_value_added_order
     * @return 结果
     */
    @Override
    public int updateValueAddedOrder(ValueAddedOrder valueAddedOrder)
    {
        valueAddedOrder.setUpdateTime(DateUtils.getNowDate());
        return valueAddedOrderMapper.updateValueAddedOrder(valueAddedOrder);
    }

    @Override
    public int updateValueAddedOrderCondition(ValueAddedOrder valueAddedOrder, ValueAddedOrder valueAddedOrderCondition)
    {
                valueAddedOrder.setUpdateTime(DateUtils.getNowDate());
        return valueAddedOrderMapper.updateValueAddedOrderCondition(valueAddedOrder, valueAddedOrderCondition);
    }

    /**
     * 批量删除fo_value_added_order
     * 
     * @param ids 需要删除的fo_value_added_order主键
     * @return 结果
     */
    @Override
    public int deleteValueAddedOrderByIds(Long[] ids)
    {
        return valueAddedOrderMapper.deleteValueAddedOrderByIds(ids);
    }

    /**
     * 删除fo_value_added_order信息
     * 
     * @param id fo_value_added_order主键
     * @return 结果
     */
    @Override
    public int deleteValueAddedOrderById(Long id)
    {
        return valueAddedOrderMapper.deleteValueAddedOrderById(id);
    }

    /**
     * 条件删除fo_value_added_order
     *
     * @param valueAddedOrder fo_value_added_order
     * @return 结果
     */
    @Override
    public int deleteValueAddedOrderByCondition(ValueAddedOrder valueAddedOrder)
    {
        return valueAddedOrderMapper.deleteValueAddedOrderByCondition(valueAddedOrder);
    }

}
